package model

// SysUser 用户表结构
type SysUser struct {
	UUID        string `gorm:"type:char(36);primaryKey"`
	Username    string `gorm:"type:varchar(100);uniqueIndex"`
	Password    string `gorm:"type:varchar(255)"`
	NickName    string `gorm:"type:varchar(100)"`
	HeaderImg   string `gorm:"type:varchar(255)"`
	AuthorityId int    `gorm:"type:int"`
	Phone       string `gorm:"type:varchar(15)"`
	Email       string `gorm:"type:varchar(100)"`
}

// TableName 设置表名
func (SysUser) TableName() string {
	return "sys_users"
}

// GetInitData 获取初始化数据
func (SysUser) GetInitData() []SysUser {
	return []SysUser{
		{
			UUID:        "1",
			Username:    "admin",
			Password:    "123456",
			NickName:    "Mr.奇淼",
			HeaderImg:   "https://qmplusimg.henrongyi.top/gva_header.jpg",
			AuthorityId: 888,
			Phone:       "17611111111",
			Email:       "333333333@qq.com",
		},
		{
			UUID:        "2",
			Username:    "a303176530",
			Password:    "123456",
			NickName:    "用户1",
			HeaderImg:   "https:///qmplusimg.henrongyi.top/1572075907logo.png",
			AuthorityId: 9528,
			Phone:       "17611111111",
			Email:       "333333333@qq.com",
		},
	}
}
